package top.yueyazhui.vhr.controller.config;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.yueyazhui.vhr.model.Menu;
import top.yueyazhui.vhr.service.MenuService;

import java.util.List;

@RestController
@RequestMapping("/system/config")
@Api(tags = "资源")
public class SystemConfigController {

    @Autowired
    MenuService menuService;

    @ApiOperation(value = "查询资源", notes = "根据用户ID查询资源")
    @GetMapping("/menu")
    public List<Menu> getMenusByHrId() {
        return menuService.getMenusByHrId();
    }
}
